package second;

public class Main {
    public static void main(String[] args) {
        ConstructionBank constructionBank = new ConstructionBank(8000, 8.236, 0.036863);
        double ci = constructionBank.ComputerInterest();
        String c = String.format("%.6f", ci);
        System.out.println("8000元存在建设银行8年零236天的利息：" + c + "元");

        BankOfDalian bankOfDalian = new BankOfDalian(8000, 8.236, 0.0374357);
        double di = bankOfDalian.ComputerInterest();
        String d = String.format("%.6f", di);
        System.out.println("8000元存在大连银行8年零236天的利息："+ d + "元");

        String sub = String.format("%.6f", di - ci);
        System.out.println("两个银行利息相差" + sub + "元");
    }
}
